﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Modele;


namespace Guitar.CustomControls
{
    /// <summary>
    /// Logique d'interaction pour ComboboxNotes.xaml
    /// </summary>
    public partial class PisteMenu : StackPanel

    {

        public int idPiste;

        private string _nom;
                public string nom
        {
            
            get { return (_nom) ;}
            set { _nom = value; TextBox_Name.Text = _nom; }
        }

                public static readonly DependencyProperty nomProperty =
                   DependencyProperty.Register("Nom", typeof(string),
                   typeof(PisteMenu), new PropertyMetadata());

        public bool isPinned = false;// Permet de spécifier si la barre reste affiché


        public PisteMenu(int id_Piste)
        {
            InitializeComponent();
            idPiste = id_Piste;
        }

        private void Rectangle_MouseEnter(object sender, MouseEventArgs e)
        {
            InfosPiste.Visibility = Visibility.Visible;

        }

        private void Rectangle_MouseLeave(object sender, MouseEventArgs e)
        {
            if (!isPinned)
            {
                InfosPiste.Visibility = Visibility.Collapsed;
            }
        }

       

        private void pin_Click(object sender, RoutedEventArgs e)
        {
            if (isPinned)
            {
                isPinned = false;


            }
            else
            {
                isPinned = true;


            }
        }

      
             

       
    }
}
